package com.naiterui.ehp.bs.im.network.transcode.coders;

import com.alibaba.fastjson.JSON;
import com.naiterui.ehp.bs.im.exception.NaiteruiIMException;
import com.naiterui.ehp.bs.im.network.protocl.CustomerMessage;
import org.springframework.stereotype.Service;

@Service
public class CustomerMessageTransCoder extends AbstractTransCoder<CustomerMessage> {

    @Override
    protected CustomerMessage deserializeMessageContent(String content) throws NaiteruiIMException {
        CustomerMessage customerMessage = JSON.parseObject(content, CustomerMessage.class);
        return customerMessage;
    }

}